The feedstock for many 3D printers is thermoplastic filament, and the physical and chemical characteristics of the filament limit the quality of an article that can be printed with it. Furthermore, the physical and chemical characteristics of the filament can vary along the length of the filament, and, therefore, it is advantageous to inspect each segment of the filament to ensure that it is within specification. When the filament contains too many segments that are out of specification, the entire filament is discarded, recycled, or used in making non-critical parts. In contrast, when only sporadic segments are out of specification, they can be cut out. In any case, the need exists for an inexpensive filament inspection system that can characterize the physical and chemical properties of each segment of a filament.